<template>
	<view>
		<web-view :src="webUrl" v-if="webUrl"></web-view>
		<view v-html="url" v-if="!webUrl&&textUrl">
			
		</view>
	</view>
</template>

<script>
	import * as index from '@/api/index.js'
	export default {
		data() {
			return {
				webUrl:'',
				textUrl:''
			}
		},
		onLoad(params){
			this.getBanner(params.id)
		},
		methods: {
			getBanner(id){
				index.getBannerInfo({bannerId:id}).then(res=>{
					this.webUrl = res.data.link
					this.textUrl = res.data.content
				})
			}
		}
	}
</script>

<style>

</style>
